import { Controller, Get } from "@nestjs/common";
import { AreaService } from "../services/area.service";

const ok = (data: any = null) => ({ code: 0, msg: "success", data });

@Controller("/user-service/area")
export class AreaController {
  constructor(private readonly areaService: AreaService) {}

  @Get("/list")
  async list() {
    const data = await this.areaService.list();
    return ok(data);
  }
}
